package web.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import service.IBookService;
import service.impl.BookServiceImpl;
import entity.Book;

public class IndexBookCheckServlet extends HttpServlet {

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
    	IBookService service=new BookServiceImpl();
    	List<Book> bookList=service.findAllBook();
    	request.setAttribute("bookList", bookList);
    	request.getRequestDispatcher("/login_systemManager.jsp").forward(request, response);
	
	}


	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doGet(request, response);
	}

}
